$(function(){
    let main = document.querySelector("#main .ulbox");
    console.log(main)
    let str ="";
    fetch("http://chst.vip:1234/api/getsitenav")
    .then(body=>body.json())
    .then(res=>{
        console.log(res.result)
        res.result.forEach(item => {
            str +=`
                    <li>
                        <a href="${item.navHref}">
                            <img src="${item.navImg}"
                            <span>${item.navTitle}</span>
                        </a>
                    </li>
                    `
        });
        main.innerHTML=str;
    })


})